﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="True" CodeBehind="EditContentPreview.aspx.cs" Inherits="Cms.Web.UI.Admin.EditContentPreview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="Admin/js/jquery-ui-1.8.15.custom.min.js"></script>    
    <script type="text/javascript" src="Admin/js/jquery-timepicker-addon.js"></script>    
    <script language="javascript" type="text/javascript" src="Admin/Js/cms.date.js"></script>
    <script language="javascript" type="text/javascript">
        //<![CDATA[
	    function initInlineDateTimePicker() {
	        var div = document.getElementById("datetimepicker");
	        var hid = document.getElementById("ctl00_body_hidScheduledPublishing");
	        setupInlineDatePicker(div, hid);
	        $(div).datetimepicker('setDate', (new Date()));
	    }

	    function schedulePublishingCallback(status) {
	        var hid = document.getElementById("ctl00_body_hidScheduledPublishing");
	        if (status != 'ok')
	            return;
	        //cms.Edit.ShowTabOverlays();
	        document.getElementById("ctl00_body_btnSchedulePublishing").click();
	    }
	    //]]>
	</script>
    <link type="text/css" href="Admin/css/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />	
    <link type="text/css" href="Admin/css/DateTimePicker.css" rel="Stylesheet" />
    <link rel="Stylesheet" href="Admin/Css/List.css" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="buttons" runat="server">
    <asp:UpdatePanel ID="upnlButtons" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <asp:hyperlink ID="hlEdit" runat="server" CssClass="orangeButton"><span><span><img src="Admin/Img/icons/page_white_edit.png" alt="" /><span><cms:LocalizedLiteral ID="llEdit" runat="server" /></span></span></span></asp:hyperlink>
            <asp:hyperlink ID="hlBack" runat="server" CssClass="orangeButton"><span><span><img src="Admin/Img/icons/arrow_undo.png" alt="" /><span><cms:LocalizedLiteral ID="llBack" runat="server" /></span></span></span></asp:hyperlink>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="tabs" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="body" runat="server">
    <asp:Literal ID="litIcon" runat="server" Visible="false" Text="Admin/Img/Icons/page_white_edit.png" />

    <asp:UpdatePanel ID="upnlContent" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <div style="position: relative;">
            <table class="editForm">
                <tr>
                    <td><cms:LocalizedLiteral ID="llLocale" runat="server" />:</td>
                    <td><asp:DropDownList ID="ddlContentLocales" runat="server" OnSelectedIndexChanged="ddlLocales_IndexChanged" AutoPostBack="true" /></td>
                    <td><cms:LocalizedLiteral ID="llVersion" runat="server" />:</td>
                    <td><asp:DropDownList ID="ddlVersions" runat="server" OnSelectedIndexChanged="ddlVersions_IndexChanged" AutoPostBack="true" /></td>
                    <td><asp:LinkButton ID="lbPublish" runat="server" OnClick="lbPublish_Click" CssClass="orangeButton"><span id="s1" runat="server"><span id="s2" runat="server"><img src="Admin/Img/icons/page_white_go.png" alt="" id="imgPublish" runat="server" /><span id="s3" runat="server"><cms:LocalizedLiteral ID="llPublish" runat="server" /></span></span></span></asp:LinkButton></td>
                    <td><a ID="hlPublishLater" runat="server" Class="orangeButton" href="javascript:void(0);"><span id="Span1" runat="server"><span id="Span2" runat="server"><img src="Admin/Img/icons/clock.png" alt="" id="img1" runat="server" /><span id="Span3" runat="server"><cms:LocalizedLiteral ID="llPublishLater" runat="server" /></span></span></span></a></td>
                </tr>
            </table>
            <table class="editForm">
                <tr>
                    <td><cms:LocalizedLiteral ID="llPublishedVersion" runat="server" />: <asp:LinkButton ID="lbSelectPublishedVersion" runat="server" OnClick="lbSelectPublishedVersion_Click" /><cms:LocalizedLiteral ID="llNoVersionPublished" runat="server" /></td>
                </tr>
            </table>
            <asp:Panel ID="pnlScheduledPublishings" runat="server">
                <span style="display: block; font-weight: bold; padding-left: 4px; padding-top: 6px; padding-bottom: 4px;">Schemalagda publiceringar</span>
                <table>
                    <tr>
                        <td>Version</td>
                        <td>Tidpunkt</td>
                        <td>&nbsp;</td>
                    </tr>
                <asp:Repeater ID="rpScheduledPublishings" runat="server" OnItemDataBound="rpScheduledPublishings_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td><asp:Literal ID="litVersion" runat="server" /></td>
                            <td><asp:Literal ID="litTimestamp" runat="server" /></td>
                            <td><asp:LinkButton ID="lbDeleteScheduledPublishing" runat="server" OnClick="lbDeleteScheduledPublishing_Click" OnClientClick="cms.Lists.ShowPaneOverlay('editContentPreviewPaneOverlay');"><cms:LocalizedLiteral ID="llDeleteScheduledPublishing" runat="server" /></asp:LinkButton></td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
                </table>
            </asp:Panel>
            <table class="editForm">
                <tr>
                    <td><cms:LocalizedLiteral ID="llMasterTemplate" runat="server" />:</td>
                    <td><asp:DropDownList ID="ddlMasterTemplates" runat="server" OnSelectedIndexChanged="ddlMasterTemplates_IndexChanged" AutoPostBack="true" /></td>
                </tr>
            </table>
            <div class="sitePreviewContainer">
                <div class="sitePreviewHeader"><cms:LocalizedLiteral ID="llPreviewHeader" runat="server" /></div>
                <iframe id="ifrContentPreview" runat="server" frameborder="0" class="sitePreview" scrolling="no" height="300"></iframe>
            </div>
            <div id="editContentPreviewPaneOverlay" class="paneOverlay"></div>
            <div id="editContentPreviewPaneOverlayProgress" class="paneOverlayProgress"><img src="Admin/img/progress.gif" /></div>
            </div>
            <div id="schedulePublishing" style="position: absolute; top:80px; left: -10000px;">
                <div style="margin-top: 10px;  margin-bottom: 10px;">
                    <div id="datetimepicker"></div>
                </div>
                <input id="hidScheduledPublishing" runat="server" type="hidden" />
            </div>
            <asp:Button ID="btnSchedulePublishing" runat="server" Text="SchedulePublishing" OnClick="btnSchedulePublishing_Click" style="position: absolute; top: 0px; left: -10000px;" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
